﻿using OnWork.DataCenter.Utils.Caches;

namespace FBlaror.Application;

/// <summary>
/// 测试
/// </summary>
public class SystemService : ISystemService, IDynamicApiController, ITransient
{
    /// <summary>
    /// 描述
    /// </summary>
    /// <returns></returns>
    public string GetDescription()
    {
        return "让 .NET 开发更简单，更通用，更流行。";
    }

    /// <summary>
    /// 测试缓存相关功能
    /// </summary>
    /// <param name="key"></param>
    /// <param name="value"></param>
    /// <returns></returns>
    public string GetMemoryCacheTest(string key, string value)
    {
        return MemoryCacheUtil.GetOrCreate(key, factory =>
        {
            return value;
        });
    }
}
